package com.base.api.qq.callback.impl;

import com.base.api.qq.callback.MessageCallback;
import com.base.api.qq.client.SmartQQClient;
import com.base.api.qq.model.DiscussMessage;
import com.base.api.qq.model.GroupMessage;
import com.base.api.qq.model.Message;
import org.springframework.stereotype.Service;

/**
 * 处理收到的消息
 *
 * @author: junw
 * @date: 2018/6/21 09:56
 */
@Service
public class MessageCallbackImpl implements MessageCallback {
    @Override
    public void onMessage(Message message, SmartQQClient client) {
        System.out.println("收到好友消息：" + message.getContent());
    }

    @Override
    public void onGroupMessage(GroupMessage message, SmartQQClient client) {
        System.out.println("收到群消息：" + message.getContent());
    }

    @Override
    public void onDiscussMessage(DiscussMessage message, SmartQQClient client) {
        System.out.println("收到讨论组消息：" + message.getContent());
    }
}
